package com.cn.api;


import com.cn.dto.LabelDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Primary
@FeignClient(value = "label-client", path = "label")
public interface LabelService {
    @PostMapping("update")
    int update(@RequestParam("LabelDto") LabelDto labelDto);

    @PostMapping("insert")
    int insert(@RequestParam("LabelDto") LabelDto labelDto);

    @GetMapping("findById")
    LabelDto findById(@RequestParam("id") int id);

    @GetMapping("delete")
    int delete(@RequestParam("id") int id);

    @GetMapping("findAll")
    List<LabelDto> findAll(@RequestParam("limit") int limit, @RequestParam("page") int page);
}
